/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package maxent.mr.mapred;

import java.io.IOException;
import java.util.Iterator;
import org.apache.hadoop.io.DoubleWritable;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.mapreduce.Reducer;

/**
 *
 * @author hadoop
 */
public class IISReducer
        extends Reducer<IntWritable, DoubleWritable, IntWritable, DoubleWritable>{


    @Override
    public void reduce(IntWritable key, Iterable<DoubleWritable> values, Context context) throws IOException, InterruptedException{

        Iterator<DoubleWritable> valueIt = values.iterator();        
        context.write(key, valueIt.next());

    }
}
